//vue.config.js
const TransformPages = require('uni-read-pages')
const {
  webpack
} = new TransformPages()

console.log(123)

module.exports = {
  transpileDependencies: ['luch-request', 'z-paging', '@dcloudio/uni-ui', 'uview-ui'],
  configureWebpack: {
    plugins: [
      new webpack.DefinePlugin({
        ROUTES: webpack.DefinePlugin.runtimeValue(() => {
          const tfPages = new TransformPages({
            includes: ['path', 'name', 'aliasPath', 'key']
          })
          return JSON.stringify(tfPages.routes)
        }, true)
      })
    ]
  }
}